Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaked the NIP 42 Validation #58

Merged
merged 3 commits into from
Feb 9, 2023
Merged

Conversation

barkyq
Copy link
Contributor

@barkyq barkyq commented Feb 9, 2023

Put signature verification as final step, as it is most expensive. Also check event == nil to prevent panics

@fiatjaf
Copy link
Collaborator

fiatjaf commented Feb 9, 2023

When is this event nil? I think we should ensure it is not nil ever instead of checking.

@barkyq
Copy link
Contributor Author

barkyq commented Feb 9, 2023

yes I suppose that is best. If someone imports the package they will probably want the panic.

@fiatjaf fiatjaf merged commit 3ccef5e into nbd-wtf:master Feb 9, 2023
@barkyq barkyq deleted the tweak_nip42 branch February 9, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants